import request from '@/utils/request';

export async function userList(params: any) {
  return request('/admin/users', {
    method: 'get',
    params,
  });
}

export async function changeStatus(user: string) {
  return request(`/admin/users/${user}/lock`, {
    method: 'PATCH',
  });
}

export async function createUser(params: any) {
  return request(`/admin/users`, {
    method: 'post',
    data: params,
  });
}

export async function userMsg(user: string) {
  return request(`/admin/users/${user}`, {
    method: 'get',
  });
}

export async function updateUser(users: string, params: any) {
  return request(`/admin/users/${users}`, {
    method: 'put',
    params,
  });
}
